package vue;

import java.awt.BorderLayout;
import java.awt.Component;

import javax.swing.JFrame;

/**
 * @author ali
 *
 */
public class FrameJeu extends JFrame {
	
	/**menu de la fenetre*/
	private Menu menu;
	private JeuPanel jeuPanel;
	private PanelOption optionPanel ;
	/**longueur de la fenetre*/
	public final int WIDTH = 200;
	/**largeur de la fenetre*/
	public final int HEIGHT = 200;
	
	
	/**
	 * Contructeur de la fenetre de l'application
	 */
	public FrameJeu() {
		
		setSize(WIDTH,HEIGHT);
		setTitle("GameBoy Emulator");
		this.getContentPane().setLayout(new BorderLayout(10,10));
		this.setLocationRelativeTo(null);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setResizable(false);
		this.setVisible(true);
		
		menu = new Menu();
		jeuPanel = new JeuPanel();	
		
		this.getContentPane().add(jeuPanel,"Center");		
		this.setJMenuBar(menu);
		
	}

	/**
	 * getter du menu
	 * @return le menu de l'appli
	 */
	public Menu getMenu() {
		return menu;
	}

	public  void setOptionPanel(PanelOption optionPanel) {
		this.optionPanel = optionPanel;
	}

	public JeuPanel getJeuPanel() {
		return jeuPanel;
	}

	public void setJeuPanel(JeuPanel jeuPanel) {
		this.jeuPanel = jeuPanel;
	}

	public PanelOption getOptionPanel() {
		return optionPanel;
	}


	
	

}
